True if the user is assigned the specified role for the default object (ParentFolder or WorkArea) or an optional specified Document (expressed as Document.ParentFolder), Folder, WorkArea, or Vault object. Read-only.
Syntax
HasRole(Role, [Object]) As Boolean
Remarks
To use this property in a visibility expression to conditionally show custom properties or pages in a new document wizard, the Object parameter must be specified as the expected destination folder of the new document. By default, new documents do not yet have a ParentFolder value in the DocGenericEvent_BeforeNewDocument event when the wizard is active.
If the default or a specified object does not have any roles assigned and also does not inherit any role assignments from a parent, this property will always return True. This behavior is by design; role-based security is disabled if there are no roles assigned in the vault. To enable role-based security and return a different result, assign at least one role to the root of the vault.